/**
 * @see [微信官方文档](https://mp.weixin.qq.com/debug/wxadoc/dev/api/device.html#wxgetnetworktypeobject)
 */

export default function get_network_type() {
	return new Promise<wx.NetworkTypeData>((resolve, reject) => {
		wx.getNetworkType({
			fail(e) {
				reject(e);
			},
			success(res) {
				resolve(res);
			}
		});
	});
}
